package com.atguigu.juc;

@FunctionalInterface
interface Animal1{
    void eat();
    default void sleep(){
        System.out.println("animal sleeping...");
    }
    static void drink(){
        System.out.println("animal eating...");
    }
}


public class LambdaTest1 {
    public static void main(String[] args) {
        Animal1 animal = ()->{
            System.out.println("animal eating...");
        };
        animal.eat();
        animal.sleep();
        Animal1.drink(); // 静态方法调用需要使用类名.方法直接调用
    }
}
